<template>
  <!--  门特单位待遇类型对比对比表-->
  <my-charts id="comparison-treatment-types" :options="chartOption" width="100%" height="90%" />
</template>

<script>
import MyCharts from '@/components/MyCharts/index'
import { toolboxCircle } from '@/components/MyCharts/toolbox'
export default {
  name: 'ComparisonTreatmentTypes',
  mixin: [],
  components: {
    'my-charts': MyCharts
  },
  props: {
    axisData: { // 纵坐标金额
      type: Array,
      default: () => []
    }
    // seriesData: { // 横坐标人数
    //   type: Array,
    //   default: () => []
    // }
  },
  data() {
    return {}
  },
  computed: {
    chartOption: function() {
      return {
        toolbox: toolboxCircle('人数'),
        tooltip: {
          show: true,
          trigger: 'item',
          axisPointer: {
            type: 'cross'
          }
        },
        xAxis: {
          name: '人数',
          scale: true,
          axisLine: {
            lineStyle: {
              color: '#000000'
            }
          }
        },
        yAxis: {
          name: '金额',
          scale: true,
          axisLine: {
            lineStyle: {
              color: '#000000'
            }
          }
        },
        series: [
          {
            name: '金额',
            type: 'effectScatter',
            symbolSize: 20,
            markLine: {
              data: [
                { name: '平均值',
                  type: 'average'
                }
              ],
              itemStyle: {
                normal: {
                  lineStyle: {
                    type: 'dashed'
                  }
                }
              }
            },
            data: this.axisData
          }
        ]
      }
    }
  },
  watch: {},
  created() {
  },
  mounted() {
  },
  methods: {}
}
</script>

<style scoped lang="scss"></style>
